﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class UnityEngineRenderingRenderTargetBindingWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(UnityEngine.Rendering.RenderTargetBinding);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 7, 7);
			
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "colorRenderTargets", _g_get_colorRenderTargets);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "depthRenderTarget", _g_get_depthRenderTarget);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "colorLoadActions", _g_get_colorLoadActions);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "colorStoreActions", _g_get_colorStoreActions);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "depthLoadAction", _g_get_depthLoadAction);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "depthStoreAction", _g_get_depthStoreAction);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "flags", _g_get_flags);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "colorRenderTargets", _s_set_colorRenderTargets);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "depthRenderTarget", _s_set_depthRenderTarget);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "colorLoadActions", _s_set_colorLoadActions);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "colorStoreActions", _s_set_colorStoreActions);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "depthLoadAction", _s_set_depthLoadAction);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "depthStoreAction", _s_set_depthStoreAction);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "flags", _s_set_flags);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 7 && translator.Assignable<UnityEngine.Rendering.RenderTargetIdentifier[]>(L, 2) && translator.Assignable<UnityEngine.Rendering.RenderBufferLoadAction[]>(L, 3) && translator.Assignable<UnityEngine.Rendering.RenderBufferStoreAction[]>(L, 4) && translator.Assignable<UnityEngine.Rendering.RenderTargetIdentifier>(L, 5) && translator.Assignable<UnityEngine.Rendering.RenderBufferLoadAction>(L, 6) && translator.Assignable<UnityEngine.Rendering.RenderBufferStoreAction>(L, 7))
				{
					UnityEngine.Rendering.RenderTargetIdentifier[] _colorRenderTargets = (UnityEngine.Rendering.RenderTargetIdentifier[])translator.GetObject(L, 2, typeof(UnityEngine.Rendering.RenderTargetIdentifier[]));
					UnityEngine.Rendering.RenderBufferLoadAction[] _colorLoadActions = (UnityEngine.Rendering.RenderBufferLoadAction[])translator.GetObject(L, 3, typeof(UnityEngine.Rendering.RenderBufferLoadAction[]));
					UnityEngine.Rendering.RenderBufferStoreAction[] _colorStoreActions = (UnityEngine.Rendering.RenderBufferStoreAction[])translator.GetObject(L, 4, typeof(UnityEngine.Rendering.RenderBufferStoreAction[]));
					UnityEngine.Rendering.RenderTargetIdentifier _depthRenderTarget;translator.Get(L, 5, out _depthRenderTarget);
					UnityEngine.Rendering.RenderBufferLoadAction _depthLoadAction;translator.Get(L, 6, out _depthLoadAction);
					UnityEngine.Rendering.RenderBufferStoreAction _depthStoreAction;translator.Get(L, 7, out _depthStoreAction);
					
					var gen_ret = new UnityEngine.Rendering.RenderTargetBinding(_colorRenderTargets, _colorLoadActions, _colorStoreActions, _depthRenderTarget, _depthLoadAction, _depthStoreAction);
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				if(LuaAPI.lua_gettop(L) == 7 && translator.Assignable<UnityEngine.Rendering.RenderTargetIdentifier>(L, 2) && translator.Assignable<UnityEngine.Rendering.RenderBufferLoadAction>(L, 3) && translator.Assignable<UnityEngine.Rendering.RenderBufferStoreAction>(L, 4) && translator.Assignable<UnityEngine.Rendering.RenderTargetIdentifier>(L, 5) && translator.Assignable<UnityEngine.Rendering.RenderBufferLoadAction>(L, 6) && translator.Assignable<UnityEngine.Rendering.RenderBufferStoreAction>(L, 7))
				{
					UnityEngine.Rendering.RenderTargetIdentifier _colorRenderTarget;translator.Get(L, 2, out _colorRenderTarget);
					UnityEngine.Rendering.RenderBufferLoadAction _colorLoadAction;translator.Get(L, 3, out _colorLoadAction);
					UnityEngine.Rendering.RenderBufferStoreAction _colorStoreAction;translator.Get(L, 4, out _colorStoreAction);
					UnityEngine.Rendering.RenderTargetIdentifier _depthRenderTarget;translator.Get(L, 5, out _depthRenderTarget);
					UnityEngine.Rendering.RenderBufferLoadAction _depthLoadAction;translator.Get(L, 6, out _depthLoadAction);
					UnityEngine.Rendering.RenderBufferStoreAction _depthStoreAction;translator.Get(L, 7, out _depthStoreAction);
					
					var gen_ret = new UnityEngine.Rendering.RenderTargetBinding(_colorRenderTarget, _colorLoadAction, _colorStoreAction, _depthRenderTarget, _depthLoadAction, _depthStoreAction);
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				if(LuaAPI.lua_gettop(L) == 2 && translator.Assignable<UnityEngine.RenderTargetSetup>(L, 2))
				{
					UnityEngine.RenderTargetSetup _setup;translator.Get(L, 2, out _setup);
					
					var gen_ret = new UnityEngine.Rendering.RenderTargetBinding(_setup);
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
				if (LuaAPI.lua_gettop(L) == 1)
				{
				    translator.Push(L, default(UnityEngine.Rendering.RenderTargetBinding));
			        return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
			}
            return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Rendering.RenderTargetBinding constructor!");
            
        }
        
		
        
		
        
        
        
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_colorRenderTargets(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.Push(L, gen_to_be_invoked.colorRenderTargets);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_depthRenderTarget(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.Push(L, gen_to_be_invoked.depthRenderTarget);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_colorLoadActions(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.Push(L, gen_to_be_invoked.colorLoadActions);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_colorStoreActions(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.Push(L, gen_to_be_invoked.colorStoreActions);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_depthLoadAction(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.PushUnityEngineRenderingRenderBufferLoadAction(L, gen_to_be_invoked.depthLoadAction);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_depthStoreAction(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.PushUnityEngineRenderingRenderBufferStoreAction(L, gen_to_be_invoked.depthStoreAction);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_flags(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.PushUnityEngineRenderingRenderTargetFlags(L, gen_to_be_invoked.flags);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_colorRenderTargets(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.colorRenderTargets = (UnityEngine.Rendering.RenderTargetIdentifier[])translator.GetObject(L, 2, typeof(UnityEngine.Rendering.RenderTargetIdentifier[]));
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_depthRenderTarget(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                UnityEngine.Rendering.RenderTargetIdentifier gen_value;translator.Get(L, 2, out gen_value);
				gen_to_be_invoked.depthRenderTarget = gen_value;
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_colorLoadActions(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.colorLoadActions = (UnityEngine.Rendering.RenderBufferLoadAction[])translator.GetObject(L, 2, typeof(UnityEngine.Rendering.RenderBufferLoadAction[]));
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_colorStoreActions(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.colorStoreActions = (UnityEngine.Rendering.RenderBufferStoreAction[])translator.GetObject(L, 2, typeof(UnityEngine.Rendering.RenderBufferStoreAction[]));
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_depthLoadAction(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                UnityEngine.Rendering.RenderBufferLoadAction gen_value;translator.Get(L, 2, out gen_value);
				gen_to_be_invoked.depthLoadAction = gen_value;
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_depthStoreAction(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                UnityEngine.Rendering.RenderBufferStoreAction gen_value;translator.Get(L, 2, out gen_value);
				gen_to_be_invoked.depthStoreAction = gen_value;
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_flags(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                UnityEngine.Rendering.RenderTargetBinding gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                UnityEngine.Rendering.RenderTargetFlags gen_value;translator.Get(L, 2, out gen_value);
				gen_to_be_invoked.flags = gen_value;
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
		
		
		
		
    }
}
